Databases have become increasingly popular and important in today's computerized world. While there are many different types of databases, one common database is the Structured Query Language (SQL) database. SQL is a language used to interrogate and process data in a relational database; SQL commands can be used to interactively work with a database or can be embedded within a programming language to interface to a database. Programming extensions to SQL have turned it into a full-blown database programming language.
Within a database (DB), a stored procedure (SP) is a SQL program that is stored in the database, and which is executed by calling it directly from a client or from a database trigger. When the SQL procedure is stored in the database, for example, it does not have to be replicated in each client. This saves programming effort, especially when different client user interfaces and development systems are used. A stored procedure can be viewed as a standard computer program in some respects, with one important difference: while standard computer programs are usually stored as one or more files on a storage such as a hard disk drive, a stored procedure is not stored as a separate file or files, but rather as text and binary streams within the database itself.
Enterprise (viz., wide-scale) SQL database developers and administrators commonly build mission-critical systems; the failure of which can be catastrophic. Therefore, they are protective of the code, such as stored procedures, that exist on both production and development databases. To store their code in such a manner as to ensure protection, developers usually use basic files, and then utilize long compile scripts to execute them and create their databases. This is less than desirable, however, since ultimately the database itself stores the code as a binary stream, as has been described.
Thus, once the databases are in production, anyone with system administrator permission can change code such as stored procedures, without any historical record as to what changes have been made. Bugs and errors introduced into the procedures, for example, may be difficult to trace. Furthermore, the database administrator is unable to examine how the code has changed over time. For these and other reasons, there is a need for the present invention.